package bjtuoj;

import java.util.Arrays;
import java.util.Scanner;

/**
 * ClassName: Homework_2_A
 * Description:
 * date: 2021-10-14 9:36
 *
 * @author liyifan
 */
public class Homework_2_A {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        boolean jwcat = false;
        int n = scanner.nextInt();
        int black_point[] = new int[3];
        for (int i = 0; i < 3; i++) {
            black_point[i] = scanner.nextInt();
        }
        for (int i = 0; i < (n - 3) * 3; i++) {
            scanner.nextInt();
        }
        Arrays.sort(black_point);
        if((black_point[0] + 1 == black_point[1] && black_point[1] + 1 == black_point[2]))
            jwcat = true;
        else if (black_point[0] == 0 && black_point[2] == n - 1 && black_point[1] == n - 2)
            jwcat = true;
        else if (black_point[0] == 0 && black_point[1] == 1 && black_point[2] == n - 1)
            jwcat = true;

        if (jwcat){
            System.out.println("JMcat Win");
            return;
        }
        if ((n - 3) % 2 == 1) {
            System.out.println("JMcat Win");
        } else {
            System.out.println("PZ Win");
        }
    }
}
